﻿@model scheduleMVC.Models.EmployeeModel

@{
    ViewBag.Title = "Create";
    SelectListItem[] User = ViewBag.User;
    
}

<h2>Create</h2>

@using (Html.BeginForm("Create", "Employee", FormMethod.Post, new { @class = "form-horizontal", role = "form" })) 
{
    @Html.AntiForgeryToken()
    
    <div class="form-horizontal">
        <h4>Create a new employee data for:<h3> @User[0].Text </h3></h4>
        <hr />
        @Html.ValidationSummary(true)


        <div class="form-group">
                @Html.Hidden("UserId",User[0].Value.ToString())
        </div>
        
        
        <div class="form-group">
            @Html.LabelFor(model => model.FirstName, new { @class = "control-label col-md-2" })
            <div class="col-md-110">
                @Html.EditorFor(model => model.FirstName)
                @Html.ValidationMessageFor(model => model.FirstName)
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.LastName, new { @class = "control-label col-md-2" })
            <div class="col-md-110">
                @Html.EditorFor(model => model.LastName)
                @Html.ValidationMessageFor(model => model.LastName)
            </div>
        </div>
        <div class="form-group">
            @Html.LabelFor(model => model.Title, new { @class = "control-label col-md-2" })
            <div class="col-md-110">
                @Html.EditorFor(model => model.Title)
                @Html.ValidationMessageFor(model => model.Title)
            </div>
        </div>
        <div class="form-group">
            @Html.LabelFor(model => model.Salary_Type, new { @class = "control-label col-md-2" })
            <div class="col-md-110">
                @Html.EditorFor(model => model.Salary_Type)
                @Html.ValidationMessageFor(model => model.Salary_Type)
            </div>
        </div>
        <div class="form-group">
            @Html.LabelFor(model => model.Salary, new { @class = "control-label col-md-2" })
            <div class="col-md-110">
                @Html.EditorFor(model => model.Salary)
                @Html.ValidationMessageFor(model => model.Salary)
            </div>
        </div>
        <div class="form-group">
            @Html.LabelFor(model => model.Manager_ID, new { @class = "control-label col-md-2" })
            <div class="col-md-110">
                @Html.EditorFor(model => model.Manager_ID)
                @Html.ValidationMessageFor(model => model.Manager_ID)
            </div>
        </div>
        <div class="form-group">
            @Html.LabelFor(model => model.SickLeave_Hrs, new { @class = "control-label col-md-2" })
            <div class="col-md-110">
                @Html.EditorFor(model => model.SickLeave_Hrs)
                @Html.ValidationMessageFor(model => model.SickLeave_Hrs)
            </div>
        </div>
        <div class="form-group">
            @Html.LabelFor(model => model.Vacation_Hrs, new { @class = "control-label col-md-2" })
            <div class="col-md-110">
                @Html.EditorFor(model => model.Vacation_Hrs)
                @Html.ValidationMessageFor(model => model.Vacation_Hrs)
            </div>
        </div>

        <div class="form-group">
            <div class="col-md-offset-2 col-md-10">
                <input type="submit" value="Create" class="btn btn-default" />
            </div>
        </div>
    </div>
}

<div>
    @Html.ActionLink("Back to List", "Index")
</div>
